<%@ Page Language="C#" %>
<%@ Import Namespace="System.Web.Mail" %>
<script runat="server">
    
    protected void Page_Load(object sender, EventArgs e)
    {        
        MailMessage mailer = new MailMessage();
		mailer.From = "Testing <chanmann@indochinaresearch.com>";
		mailer.To = "chanmann@indochinaresearch.com";
		mailer.Cc = "chanmannlim@gmail.com";
		//mailer.To = "chanmannlim@gmail.com";
		mailer.Subject = "Testing only(.NET)";
		mailer.BodyFormat = MailFormat.Html;
		mailer.Body = "<h1>Hi.....</h1>";
		
		// setting
		mailer.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", "2");		// Remote server
		mailer.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); // Basic authentication
		mailer.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "chanmann");
		mailer.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "irlclim");
		
		//send mail
		//SmtpMail.SmtpServer = "192.168.0.5";
		SmtpMail.SmtpServer = "exchange.indochinaresearch.com";
		SmtpMail.Send(mailer);
    }
    
    
    
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Send mail with ASP.NET</title>
</head>
<body>
Please check your mailbox.
</body>
</html>
